package com.lepu.app.fun.my.bean;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class BeanScoreInfo {
	
	public int ID;//	明细id
	public int Credits;//	现在积分数
	public int CreditsChange;//	变化数
	public String CreditsChangeContent;//	变化原因
	public String CreditsChangeTime;//	时间
	
	
	public static ArrayList<BeanScoreInfo> parseJsonData(String dataString)
	{
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONArray jsonArray = obj1.getJSONArray("ListInfo");
			
			result = jsonArray.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		Gson gson = new Gson();
		ArrayList<BeanScoreInfo> testArraylist = gson.fromJson(result,
				new TypeToken<List<BeanScoreInfo>>() {
				}.getType());
		return testArraylist;
	}

}
